<template>
  <ul class="es-list-group" style="margin-bottom: 10px">
    <li
      class="es-list-group-item es-list-group-item-secondary es-list-group-title"
      v-if="title"
    >
      {{ title }}
    </li>
    <li class="es-list-group-item" v-for="(item, index) in data" :key="index">
      <router-link :to="{ path: item.path, params: { ...item.params } }">
        {{ item.name }}
      </router-link>
    </li>
  </ul>
</template>

<script>
export default {
  name: "ListGroup",
  props: {
    data: {
      type: Array,
      default() {
        return [];
      },
    },
    title: {
      type: String,
      default() {
        return "";
      },
    },
  },
};
</script>

<style lang="scss">
.list_group {
}
</style>
